package com.example.service;

import com.example.entity.CommonResult;
import com.example.entity.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author: 21050134
 * @date: 2023/10/13 14:53
 * @description:
 */
@Component
@FeignClient(value = "spring-cloud-alibaba-provider-mysql")
public interface DeptFeignService {
	@RequestMapping(value = "/dept/get/{id}",method = RequestMethod.GET)
	public CommonResult<Dept> get(@PathVariable("id") Integer id);

	@RequestMapping(value = "/dept/list",method = RequestMethod.GET)
	public CommonResult<List<Dept>> list();

}
